var app = getApp();


Page({
  data: {
    url:app.globalData.url
  },
  onLoad() {},
  requestTest(){
    console.log(this.data.url)
  },
  myrequest(){
    let url =this.data.url;
    // Content-Type为application/x-www-form-urlencoded即默认的接口请求方式
    dd.httpRequest({
      url: url+"/houseOwner/sendRegMessage",
      method: 'POST',
      data: {
        mobile:'18855441707'
      },
      dataType: 'json',
      success: function(res) {
        console.log("success",res)
        let code
      },
      fail: function(res) {
        console.log('fail')
      },
      complete: function(res) {
       console.log("complete")
      }
    });

    // Content-Type为application/json时，data参数只支持json字符串，用户需要手动调用JSON.stringify进行序列化
    // headers: {
    //   "Content-Type": "application/json"
    // },
     
  },

});
